{% extends "base.html" %}

{% block content %}
<h2>Praktyki</h2>
<table>
    <thead><tr>
        <th>Firma</th>
        <th>Daty trwania</th>
        <th>Akademik?</th>
        <th>Płatna?</th>
        <th>Zagraniczna?</th>
        <th></th>
        <th></th>
    </tr></thead>
{% for training in trainings %}
    <tr>
        <td>{% firstof training.branch "n/d" %}</td>
        <td>{% firstof training.training_date "n/d" %}</td>
        <td>{% if training.hostel %} tak {% else %} nie {% endif %}</td>
        <td>{% if training.payable %} tak {% else %} nie {% endif %}</td>
        <td>{% if training.abroad %} tak {% else %} nie {% endif %}</td>
        <td><a href="/my_trainings/show/{{ training.id }}/">Pokaż</a></td>
        <td>{% if not training.locked %}<a href="/my_trainings/edit/{{ training.id }}/">Edytuj</a>{% else %}zablokowane{% endif %}</td>
    </tr>
    {% endfor %}
</table>
{% endblock %}

